/*
 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
 * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
 * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */
package org.palading.clivia.support.common.util;

import javax.crypto.Cipher;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;

/**
 * @author palading_cr
 * @title RsaUtil
 * @project clivia
 */
public class RsaUtil {

    public static void main(String[] args) {
        // Java生成公钥私钥

        // 实例化密钥生成器
        KeyPairGenerator keyPairGenerator = null;
        try {
            keyPairGenerator = KeyPairGenerator.getInstance("RSA");
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        // 初始化密钥生成器

        /**
         * 密钥长度，DH算法的默认密钥长度是1024 密钥长度必须是64的倍数，在512到65536位之间
         * */

        keyPairGenerator.initialize(1024);
        // 生成密钥对
        KeyPair keyPair = keyPairGenerator.generateKeyPair();
        // 甲方公钥
        RSAPublicKey publicKey = (RSAPublicKey)keyPair.getPublic();
        System.out.println("系数：" + publicKey.getModulus() + "  加密指数：" + publicKey.getPublicExponent());
        // 甲方私钥
        RSAPrivateKey privateKey = (RSAPrivateKey)keyPair.getPrivate();
        System.out.println("系数：" + privateKey.getModulus() + "解密指数：" + privateKey.getPrivateExponent());

        System.out.println("公钥：" + publicKey.getEncoded());
        System.out.println("私钥：" + privateKey.getEncoded());

        String msg =
            "{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}\"warmup\":1{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}}],{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}\"loadbalanceType\":\"roundrobin\",{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}\"clientIp\":null,{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}\"retryTimes\":1,v\"timeOutMillis\":1000,{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}\"serviceId\":null{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}{\"loadbalanceRouters\":[{\"upstreamUrl\":null,\"upstreamWeight\":0,\"enabled\":false,\"timestamp\":0,\"warmup\":0},{\"upstreamUrl\":\"http://xxx/xxxx2\",\"upstreamWeight\":20,\"enabled\":true,\"timestamp\":1902929304,\"warmup\":1}],\"loadbalanceType\":\"roundrobin\",\"clientIp\":null,\"retryTimes\":1,\"timeOutMillis\":1000,\"headers\":\"headerKey=headerValue,headerKey2=headerValue2\",\"serviceId\":null}";
        System.out.println(new String(decryptByRSA1(publicKey.getEncoded(),
            encryptByRSA1(privateKey.getEncoded(), msg.getBytes()))));
    }

    /**
     * 使用RSA私钥加密数据
     *
     * 打包的byte[]形式私钥
     * 
     * @param data
     *            要加密的数据
     * @return 加密数据
     */
    public static byte[] encryptByRSA1(byte[] privKeyInByte, byte[] data) {
        try {
            PKCS8EncodedKeySpec priv_spec = new PKCS8EncodedKeySpec(privKeyInByte);
            KeyFactory mykeyFactory = KeyFactory.getInstance("RSA");
            PrivateKey privKey = mykeyFactory.generatePrivate(priv_spec);
            Cipher cipher = Cipher.getInstance(mykeyFactory.getAlgorithm());
            cipher.init(Cipher.ENCRYPT_MODE, privKey);
            return cipher.doFinal(data);
        } catch (Exception e) {
            return null;
        }

    }

    /**
     * 用RSA公钥解密
     *
     * @param privKeyInByte
     *            公钥打包成byte[]形式
     * @param data
     *            要解密的数据
     * @return 解密数据
     */
    public static byte[] decryptByRSA1(byte[] pubKeyInByte, byte[] data) {
        try {
            KeyFactory mykeyFactory = KeyFactory.getInstance("RSA");
            X509EncodedKeySpec pub_spec = new X509EncodedKeySpec(pubKeyInByte);
            PublicKey pubKey = mykeyFactory.generatePublic(pub_spec);
            Cipher cipher = Cipher.getInstance(mykeyFactory.getAlgorithm());
            cipher.init(Cipher.DECRYPT_MODE, pubKey);
            return cipher.doFinal(data);
        } catch (Exception e) {
            return null;
        }
    }

    /**
     * 公钥加密
     * 
     * @param data
     *            待加密数据
     * @param key
     *            密钥
     * @return byte[] 加密数据
     * */
    public static byte[] encryptByPublicKey(byte[] data, byte[] key) throws Exception {

        // 实例化密钥工厂
        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
        // 初始化公钥
        // 密钥材料转换
        X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(key);
        // 产生公钥
        PublicKey pubKey = keyFactory.generatePublic(x509KeySpec);

        // 数据加密
        Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
        cipher.init(Cipher.ENCRYPT_MODE, pubKey);
        return cipher.doFinal(data);
    }

    /**
     * 私钥解密
     * 
     * @param data
     *            待解密数据
     * @param key
     *            密钥
     * @return byte[] 解密数据
     * */
    public static byte[] decryptByPrivateKey(byte[] data, byte[] key) throws Exception {
        // 取得私钥
        PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(key);
        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
        // 生成私钥
        PrivateKey privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
        // 数据解密
        Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
        cipher.init(Cipher.DECRYPT_MODE, privateKey);
        return cipher.doFinal(data);
    }

}
